import http from "@/common/http/request";
import {
  panelApkListInterface,
  panelApkAddInterface,
  panelApkEditInterface,
} from "./panelApk.interface";

// 面板应用管理-列表
export const $panelApkList = (data: panelApkListInterface) => {
  const $http = new http();
  return $http.get({
    url: '/system/panelApk/list',
    data,
  })
}
// 面板应用管理-详情
export const $panelApkDetail = (id: number) => {
  const $http = new http();
  return $http.get({
    url: `/system/panelApk/${id}`,
  })
}
// 面板应用管理-新增
export const $panelApkAdd = (data: panelApkAddInterface) => {
  const $http = new http();
  return $http.post({
    url: `/system/panelApk`,
    data,
  })
}
// 面板应用管理-修改
export const $panelApkEdit = (data: panelApkEditInterface) => {
  const $http = new http();
  return $http.put({
    url: `/system/panelApk`,
    data,
  })
}
// 面板应用管理-删除
export const $panelApkDelete = (ids: number[]) => {
  const $http = new http();
  return $http.delete({
    url: `/system/panelApk/${ids.join(',')}`,
  })
}